package com.qf.qfleadnewsfeignapi.schedule;

import com.qf.qfleadnewsmodel.schedule.dtos.Task;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

@FeignClient(value = "leadnews-schedule")
public interface ScheduleApi {

    @PostMapping("/schedule/api/addTask")
    void addTask(@RequestBody Task task);

    @GetMapping("/schedule/api/consumeTask/{taskType}/{priority}")
    Task consumeTask(@PathVariable("taskType") Integer taskType, @PathVariable("priority") Integer priority);
}
